<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>现金流水</title>
<link rel="stylesheet" href="/bsc/js/common/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/bsc/js/common/bootstrap/css/bootstrap-theme.min.css">
<script src="/bsc/js/common/bootstrap/js/jquery-3.1.1.min.js"></script>
<script src="/bsc/js/common/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<form class="form-inline" role="form"  method="post" action="findcash">
<table >
<tr>
<td><label>订单编号</label></td>
<td><input type="text" class="form-control" name ="order_id" id="order_id"></td>
<td><label>顾客账号</label></td>
<td><input class="form-control" type="text" name ="custom_user_id" id="custom_user_id"></td>
<td><label>顾客姓名</label></td>
<td><input type="text" class="form-control" name ="username" id="username"></td>


  <td rowspan="4"><button type="submit" class="btn btn-primary">查询</button>&nbsp;
  <button type="button" class="btn btn-primary" id="clear">重置</button>&nbsp;
  <input type="button" id="exportExcel" class="btn btn-primary" value="导出excel"/> 
  <td>
  
</tr>
<tr>
<td> <label>支付方式</label></td>
<td><select class="form-control" name="pay_way" id="pay_way">
  <option value=""></option>
  <option value="1">微信</option>
  <option value="2">支付宝</option>
  </select></td>
<td> <label>分类</label></td>
<td><select class="form-control"name="record_type" id="record_type">
  <option value=""></option>
  <option value="1">购买美颜币</option>
  <option value="2">购买套餐</option>
  <option value="3">使用消费</option>
  <option value="4">预约</option>
  </select></td>
<td><label>支付时间</label></td>
<td><input class="form-control" type=date name ="begdate" id="begdate">至:
<input class="form-control" type="date" name ="enddate" id="enddate"></td>
</tr>
</table>
</form>

<table border="1" width="918" id="table" class="table table-striped" class="table table-hover">
<tr>
<td colspan="11"></td>
</tr>
<tr style="background-color: #E6EEF8">
<td>&nbsp&nbsp&nbsp&nbsp</td>
<td>流水号</td>
<td>订单编号</td>
<td>顾客账号</td>
<td>姓名</td>
<td>颜值数量</td>
<td>支付方式</td>
<td>实际消费金额</td>
<td>分类</td>
<td>支付时间</td>

</tr>
<c:forEach items="${list }" var="list">
<tr style="background-color: ">
<td>&nbsp&nbsp&nbsp&nbsp</td>
<td>${list.record_id }</td>
<td>${list.order_id }</td>
<td>${list.custom_user_id }</td>
<td>${list.username }</td>
<td>${list.beauty_num} </td>
<td>${list.pay_way =="1"?"微信":"支付宝"}</td>
<td>${list.money }</td>
<td>
${list.record_type=="1"?"购买美颜币":list.order_type=="2"?"购买套餐":list.record_type=="3"?"使用消费":"预约" }
</td>
<td>${list.pay_time }</td>
</tr>
</c:forEach>
</table>
<form action="" method="post" id="zhangnuo">

</form>
<script  type="text/javascript">
$("#exportExcel").on("click",function(){
	var url = "http://localhost:8081/bsc/cashexcel";
	$("#zhangnuo").attr("action",url);
	$("#zhangnuo").submit();
});
</script>
</body>
</html>
<script>
$("#clear").click(
		function() {
			$("#order_id").val("");
			$("#custom_user_id").val("");
			$("#username").val("");
			$("#pay_way").val("");
			$("#record_type").val("");
			$("#begdate").val("");
			$("#enddate").val("");
		}
	);
</script>


